<?php
include(dirname(__FILE__)."/inc/taobaoCom.php");
$class = new taobaoCom();
$allCats = array();
function getAllCat($class,$parentID="0")
{
	global $allCats;
	$cats = $class->getCats($parentID);
	foreach ($cats as $cat)
	{
		$allCats[$cat['cid']]= $cat;
		if ($cat['is_parent'])
		{
			getAllCat($class,$cat['cid']);
		}
	}
}
getAllCat($class);
$catStr = serialize($allCats);
echo "<?php\n";
echo "\$allCatsStr='".$catStr."';\n";
echo "?>";
?>